package com.dc.free.plugin;

import java.util.List;

import com.alibaba.fastjson.JSON;
import com.dc.free.module.synchronization_zsedz_view.db.model.SynchronizationZsedzView;
import com.dc.free.module.synchronization_zsedz_view.service.SynchronizationZsedzViewService;

public class SynchronizationZsedzViewScannerPlugin extends ScannerPlugin<SynchronizationZsedzView> {

	@Override
	public List<SynchronizationZsedzView> scan() {
		return SynchronizationZsedzViewService.list(
				new SynchronizationZsedzView().setStatus(1)
				);
	}

	@Override
	public String getUnionCode(SynchronizationZsedzView t) {
		return t.getId();
	}
	
	@Override
	public void clean(String[] unionCodes) {
		for(String id: unionCodes) {
			SynchronizationZsedzView.dao.deleteById(id);
		}
		System.out.println("clean:" + JSON.toJSONString(unionCodes));
	}
	
}